<!-- signin modal -->
<div class="modal fade signin-modal" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-sm">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="mySmallModalLabel"><%= __('Choose method') %></h4>
            </div>
            <div class="modal-body" style="text-align: center;">
                <% if (authProviders.facebook) { %>
                <a href="<%- serverURL %>/auth/facebook" class="btn btn-lg btn-block btn-login-method btn-facebook">
                    <i class="fa fa-facebook"></i> <%= __('Sign in via %s', 'Facebook') %>
                </a>
                <% } %>
                <% if (authProviders.twitter) { %>
                <a href="<%- serverURL %>/auth/twitter" class="btn btn-lg btn-block btn-login-method btn-twitter">
                    <i class="fa fa-twitter"></i> <%= __('Sign in via %s', 'Twitter') %>
                </a>
                <% } %>
                <% if (authProviders.github) { %>
                <a href="<%- serverURL %>/auth/github" class="btn btn-lg btn-block btn-login-method btn-github">
                    <i class="fa fa-github"></i> <%= __('Sign in via %s', 'GitHub') %>
                </a>
                <% } %>
                <% if (authProviders.bitbucket) { %>
                <a href="<%- serverURL %>/auth/bitbucket" class="btn btn-lg btn-block btn-login-method btn-bitbucket">
                    <i class="fa fa-bitbucket"></i> <%= __('Sign in via %s', 'Bitbucket') %>
                </a>
                <% } %>
                <% if (authProviders.gitlab) { %>
                <a href="<%- serverURL %>/auth/gitlab" class="btn btn-lg btn-block btn-login-method btn-gitlab">
                    <i class="fa fa-gitlab"></i> <%= __('Sign in via %s', 'GitLab') %>
                </a>
                <% } %>
                <% if (authProviders.mattermost) { %>
                <a href="<%- serverURL %>/auth/mattermost" class="btn btn-lg btn-block btn-login-method btn-mattermost">
                    <i class="oauth-icon"><img alt="mattermost-logo" src="<%- serverURL %>/images/mattermost-logo.svg" /></i> <%= __('Sign in via %s', 'Mattermost') %>
                </a>
                <% } %>
                <% if (authProviders.dropbox) { %>
                <a href="<%- serverURL %>/auth/dropbox" class="btn btn-lg btn-block btn-login-method btn-dropbox">
                    <i class="fa fa-dropbox"></i> <%= __('Sign in via %s', 'Dropbox') %>
                </a>
                <% } %>
                <% if (authProviders.google) { %>
                <a href="<%- serverURL %>/auth/google" class="btn btn-lg btn-block btn-login-method btn-google">
                    <i class="fa fa-google"></i> <%= __('Sign in via %s', 'Google') %>
                </a>
                <% } %>
                <% if (authProviders.saml) { %>
                <a href="<%- serverURL %>/auth/saml" class="btn btn-lg btn-block btn-login-method btn-success">
                    <i class="fa fa-users"></i> <%= __('Sign in via %s', 'SAML') %>
                </a>
                <% } %>
                <% if (authProviders.oauth2) { %>
                <a href="<%- serverURL %>/auth/oauth2" class="btn btn-lg btn-block btn-login-method btn-soundcloud">
                    <i class="fa fa-mail-forward"></i> <%= __('Sign in via %s', authProviders.oauth2ProviderName || 'OAuth2') %>
                </a>
                <% } %>
                <% if ((authProviders.facebook || authProviders.twitter || authProviders.github || authProviders.bitbucket || authProviders.gitlab || authProviders.mattermost || authProviders.dropbox || authProviders.google || authProviders.saml || authProviders.oauth2) && authProviders.ldap) { %>
                <hr>
                <% }%>
                <% if (authProviders.ldap) { %>
                <h4><%= __('Sign in via %s', authProviders.ldapProviderName ? authProviders.ldapProviderName + ' (LDAP)' : 'LDAP') %></h4>
                <form data-toggle="validator" role="form" class="form-horizontal" method="post" enctype="application/x-www-form-urlencoded">
                    <div class="form-group">
                        <div class="col-sm-12">
                            <input type="username" class="form-control" name="username" placeholder="Username" required>
                            <span class="help-block control-label with-errors" style="display: inline;"></span>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-12">
                            <input type="password" class="form-control" name="password" placeholder="Password" required>
                            <span class="help-block control-label with_errors" style="display: inline;"></span>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-12">
                            <button type="submit" class="btn btn-primary" formaction="<%- serverURL %>/auth/ldap"><%= __('Sign In') %></button>
                        </div>
                    </div>
                </form>
                <% } %>
                <% if ((authProviders.facebook || authProviders.twitter || authProviders.github || authProviders.bitbucket || authProviders.gitlab || authProviders.mattermost || authProviders.dropbox || authProviders.google || authProviders.ldap || authProviders.oauth2) && authProviders.openID) { %>
                <hr>
                <% }%>
                <% if (authProviders.openID) { %>
                <h4><%= __('Sign in via %s', 'OpenID') %></h4>
                <form data-toggle="validator" role="form" class="form-horizontal" method="post" enctype="application/x-www-form-urlencoded">
                    <div class="form-group">
                        <div class="col-sm-12">
                            <input type="text" class="form-control" name="openid_identifier" placeholder="OpenID" required>
                            <span class="help-block control-label with-errors" style="display: inline;"></span>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-12">
                            <button type="submit" class="btn btn-primary" formaction="<%- serverURL %>/auth/openid"><%= __('Sign In') %></button>
                        </div>
                    </div>
                </form>
                <% } %>
                <% if ((authProviders.facebook || authProviders.twitter || authProviders.github|| authProviders.bitbucket || authProviders.gitlab || authProviders.mattermost || authProviders.dropbox || authProviders.google || authProviders.ldap || authProviders.oauth2 || authProviders.openID) && authProviders.email) { %>
                <hr>
                <% }%>
                <% if (authProviders.email) { %>
                <h4><%= __('Sign in via %s', 'E-Mail') %></h4>
                <form data-toggle="validator" role="form" class="form-horizontal" method="post" enctype="application/x-www-form-urlencoded">
                    <div class="form-group">
                        <div class="col-sm-12">
                            <input type="email" class="form-control" name="email" placeholder="E-Mail" required>
                            <span class="help-block control-label with-errors" style="display: inline;"></span>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-12">
                            <input type="password" class="form-control" name="password" placeholder="Password" required>
                            <span class="help-block control-label with-errors" style="display: inline;"></span>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-12">
                            <button type="submit" class="btn btn-primary" formaction="<%- serverURL %>/login"><%= __('Sign In') %></button>
                            <% if (authProviders.allowEmailRegister) { %><button type="submit" class="btn btn-default" formaction="<%- serverURL %>/register"><%= __('Register') %></button><% }%>
                        </div>
                    </div>
                </form>
                <% }%>
            </div>
        </div>
    </div>
</div>
